Skip to content

Add GuessTheNumber question type#54

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-guess-the-number-type
Draft

Add GuessTheNumber question type#54
Copilot wants to merge 2 commits intomainfrom
copilot/add-guess-the-number-type

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 6, 2026

Implements a new question type where users enter a number within a configurable range. The correct answer is validated against a specific value within that range.

Model Layer

  • GuessTheNumberQuestion with MinValue, MaxValue, and CorrectAnswer properties
  • ClientGuessTheNumberQuestion and ClientGuessTheNumberAnswer for client-server communication
  • Updated polymorphic type discriminators and JSON converters

UI Components

  • Edit: Range configuration (min/max) and correct answer input
  • Client: Number input with client-side range validation
  • Presenter: Question display with correct answer visible to quiz host

Integration

  • Added "Guess the Number" option to QuestionTypePickerModal
  • Wired question type routing in Edit, Client, and Present QuestionPicker components
  • Default values: range 0-100, answer 50, timeout 30s
new GuessTheNumberQuestion
{
    Title = "How many moons does Jupiter have?",
    MinValue = 1,
    MaxValue = 100,
    CorrectAnswer = 79,
    Timeout = 30
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add GuessTheNumber question type</issue_title>
<issue_description>Users should be prompted to enter a number, the correct answer should be within a range

Stretch goal, bonus points for closest to the answer?</issue_description>

<agent_instructions>Create a new quiz type for quessing the number within a range. Make sure to update the client, manage and presenter views</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: fortunkam <1851394+fortunkam@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GuessTheNumber question type Add GuessTheNumber question type Jan 6, 2026
Copilot AI requested a review from fortunkam January 6, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GuessTheNumber question type

2 participants